package com.senmo.video.jni;

/**
 * author: lx
 * date: 16-1-12
 *
 * warning: when modify fields of this class, jni file should be modified
 * accordingly, or native crash will happen!
 */
public class FrameData {

    public byte[] data;
    public boolean valid;
    public int buffer_size;
    public int handle;
    public int len;
    public int yLen;
    public int uLen;
    public int vLen;
    public int yStride;
    public int uvStride;
    public int errorCode;
    public long width;
    public long height;
    public float deviceFlowRate;
    public float clientFlowRate;

    public FrameData(int handle, int buffer_size) {
        this.handle = handle;
        this.buffer_size = buffer_size;
        this.data = new byte[buffer_size];
    }

    @Override
    public String toString() {
        return "FrameData{" +
                "handle=" + handle +
                ", valid=" + valid +
                ", buffer_size=" + buffer_size +
                ", len=" + len +
                ", yLen=" + yLen +
                ", uLen=" + uLen +
                ", vLen=" + vLen +
                ", yStride=" + yStride +
                ", uvStride=" + uvStride +
                ", errorCode=" + errorCode +
                ", width=" + width +
                ", height=" + height +
                ", deviceFlowRate=" + deviceFlowRate +
                ", clientFlowRate=" + clientFlowRate +
                '}';
    }

}
